home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / 1995.02 / 000003_vieth@thphy.uni-duesseldorf.de_Thu Feb 2 17:55:46 1995.msg < prev    next >
Internet Message Format  |  1995-02-28  |  14KB

  1. Received: from thphy.uni-duesseldorf.de (xerxes.thphy.uni-duesseldorf.de) by cs.umb.edu with SMTP id AA26638
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Thu, 2 Feb 1995 14:00:53 -0500
  3. Received: from macbeth.thphy.uni-duesseldorf.de.thphy.uni-duesseldorf.de by thphy.uni-duesseldorf.de (4.1/SMI-4.1)
  4.     id AA02220; Thu, 2 Feb 95 16:55:46 +0100
  5. Date: Thu, 2 Feb 95 16:55:46 +0100
  6. From: vieth@xerxes.thphy.uni-duesseldorf.de
  7. Message-Id: <9502021555.AA02220@thphy.uni-duesseldorf.de>
  8. Received: by macbeth.thphy.uni-duesseldorf.de.thphy.uni-duesseldorf.de (4.1/SMI-4.1)
  9.     id AA01441; Thu, 2 Feb 95 16:54:57 +0100
  10. To: tex-k@cs.umb.edu
  11. Cc: hobby@research.att.com
  12. Subject: File: web2c.mp.notes
  13.  
  14. Compiling MetaPost (MP) with web2c-6.1/kpathsea-2.6:
  15. ====================================================
  16.  
  17. Here are some notes on how to compile MetaPost with the current release
  18. of web2c-6.1 with kpathsea-2.6, so that MP can take advantage of the 
  19. advanced path searching facilities.
  20.  
  21. 0. Get web2c-6.1, kpathsea-2.6 and set it up:
  22.  
  23.    a) Get web-6.1.tar.gz and web2c-6.1.tar.gz from CTAN:systems/web2c.
  24.  
  25.    b) Get kpathsea-2.6 from either xdvik-18f.tar.gz, dvipsk-5.58f.tar.gz
  26.       or dviljk-2.3f.tar.gz from CTAN:dviware/{xdvik,dvipsk,dviljk}.
  27.  
  28.    c) Get the patch web2c.kpathsea-2.6.help from CTAN:systems/web2c
  29.       and follow the instructions therein to set up everything under
  30.       the common top-level directory kpathsea-2.6. (Note: the patch
  31.       web2c.kpathsea-2.5.help seems to work as well with kpathsea-2.6
  32.       except for some redundant patches in the top-level configure.)
  33.  
  34.  
  35. 1. Get John Hobby's original MetaPost distribution for web2c-5.581,
  36.    i.e. get metapost.tar.gz from CTAN:graphics/metapost and unpack
  37.    it into a separate directory.
  38.  
  39.    The MetaPost distribution is structured as follows:
  40.    
  41.    .            top-level files and AT&T copyright disclaimers
  42.    ./doc        documentation files and manual page
  43.    ./mp         sources for MetaPost
  44.    ./mp/trapdir sources for MetaPost's trap test  
  45.    ./mpware     sources for MetaPost support programs
  46.    ./mplib      MetaPost macro files, font map files,
  47.             troff support files for MetaPost 
  48.             and some more documentation files
  49.  
  50.    To compile MetaPost with web2c-6.1/kpathsea-2.6 several files 
  51.    of the original distribution can be discarded, others need to 
  52.    be changed via patches and some new files need to be added.
  53.  
  54.    To do so, the following steps are needed:
  55.  
  56.    a) Clean up the MetaPost distribution and rearrange it a bit.
  57.   
  58.    b) Move the files and/or directories to the proper place in 
  59.       the web2c source tree or the texmf library directory tree.
  60.  
  61.    c) Add some new files from this distribution to the web2c source 
  62.       tree. These files were mostly derived from similar parts of 
  63.       the web2c sources, such as web2c/mf and web2c/dviutil. The 
  64.       required files are located in the shar archive web2c.mp.shar.
  65.  
  66.    d) Apply some patches to various files from the MetaPost and 
  67.       web2c distributions. These patches are collected in the file
  68.       web2c.mp.patch.
  69.  
  70.    These steps will be described in detail below.
  71.  
  72.  
  73. 2. Step a) Cleaning up:
  74.  
  75.    The following files can be discarded (removed) from the MetaPost
  76.    distribution:
  77.  
  78.    ./Makefile       replaced by web2c/Makefile.in
  79.    ./defaults.h     replaced by web2c/lib/c-auto.h.in
  80.    ./site.h         replaced by web2c/lib/c-auto.h.in (mostly)
  81.    
  82.    ./mp/Makefile    replaced by web2c/mp/Makefile.in
  83.    ./mp/convert        replaced by web2c/mp/convert (new version)
  84.    ./mp/fix.lex        obsolete
  85.    ./mp/fixcoerce.c    obsolete
  86.    ./mp/ini_to_trap    replaced by web2c/mp/trap.sed
  87.    ./mp/mathtest.c    not needed for production version
  88.    ./mp/mp.def        replaced by web2c/web2c/texmf.defines
  89.    ./mp/mp.h            redundant (except for timing test files)
  90.    ./mp/mpext.c        replaced by web2c/lib/lib.a
  91.    ./mp/trapmp        replaced by web2c/mp/trapenv
  92.    ./mp/pmath.c        not needed for production version
  93.    ./mp/test_mpd.h    not needed for production version
  94.    ./mp/time.c        not needed for production version
  95.  
  96.    ./mpware/Makefile    replaced by web2c/mpware/Makefile.in
  97.    ./mpware/convert    replaced by web2c/lib/convert
  98.    ./mpware/dvimpext.c  replaced by web2c/lib/lib.a
  99.    ./mpware/mpware.def  replaced by web2c/web2c/common.defines
  100.    ./mpware/mpware.h    redundant
  101.  
  102.    The following files should be rearranged:
  103.  
  104.    ./mplib/makempx      rename to makempx.in (will be patched later)
  105.    ./mplib/troffmpx     rename to troffmpx.in (will be patched later)
  106.  
  107.    ./doc/mp.1        move to top level directory, since it will
  108.                         be installed in a different place from the
  109.                         rest of the files in the ./doc subdirectory
  110.    
  111.    ./mplib/examples.mp  move to ./doc directory
  112.    ./mplib/mpintro.bib    move to ./doc directory
  113.    ./mplib/mpintro.tex    move to ./doc directory
  114.             (You might also want to add a \maketitle 
  115.                         just after \begin{document} in this file.)
  116.  
  117.  
  118. 3. Step b) Installing files and directories:
  119.  
  120.    Now, it's time to install everything in the proper place. Some of 
  121.    the preceding rearrangements were just to make things easier now.
  122.    In most cases you can simply move the directories to the desired 
  123.    destination instead of copying or moving the files, unless of course
  124.    you'll have to move them across filesystems in your installation.
  125.  
  126.    ./mp/*               move to kpathsea-2.6/web2c/mp
  127.    ./mp/trapdir/*       move/rename to kpathsea-2.6/web2c/mp/MPtrap
  128.    ./mpware/*           move to kpathsea-2.6/web2c/mpware
  129.  
  130.    ./mp.1               move/rename to kpathsea-2.6/man/mp.man 
  131.  
  132.    ./doc/*              move to texmf/doc/mp (documentation files)
  133.  
  134.    ./mplib/*.mp     move to texmf/mp (MetaPost macro files)
  135.    ./mplib/mproof.tex   move to texmf/tex/plain/<somewhere>
  136.  
  137.    ./mplib/psfonts.map  move/rename tp texmf/dvips/mpfonts.map
  138.             (Ideally MP should use the psfonts.map from 
  139.             dvipsk, but this doesn't work currently.)
  140.  
  141.    ./mplib/trfonts.map    move to texmf/mplib (troff support files)
  142.    ./mplib/trchar.adj    move to texmf/mplib (troff support files)
  143.    ./mplib/charlib/*       move to texmf/mplib/charlib
  144.  
  145.    ./*             copy/move to kpathsea-2.6/web2c/{mp,mpware}
  146.                         (top-level files such as copyright disclaimers 
  147.             that must preserved for legal reasons)
  148.  
  149.  
  150. 4. Step c) Adding new files:
  151.  
  152.    In some cases it was necessary to add new files that were developed
  153.    on the basis of similar files from other parts of the web2c sources,
  154.    such as from web2c/mf (for mp) or from web2c/dviutil (for mpware). 
  155.  
  156.    In other cases some existing files were replaced by some similar 
  157.    files under a different name that serve exactly the same purpose, 
  158.    but using some slightly different methods. Since it would have 
  159.    been to complicated to implement the necessary changes via patches
  160.    and renaming the files manually, these files are simply distributed
  161.    as new files as part of this distribution files, even though they 
  162.    could have been produced by patching files that were discarded 
  163.    in Step 2 above.
  164.   
  165.    The following new files have to be added to the web2c sources: 
  166.    (They are located in the subdirectories of this archive.)
  167.  
  168.    web2c/mp/Makefile.in     adapted from web2c/mf/Makefile.in
  169.    web2c/mp/convert           adapted from web2c/mf/convert
  170.    web2c/mp/coerce.add        adapted from web2c/mf/coerce.add
  171.    web2c/mp/small.sed        adapted from web2c/mf/small.sed
  172.    web2c/mp/trap.sed        adpated from web2c/mf/trap.sed
  173.    web2c/mp/trapenv        adapted form web2c/mf/trapenv
  174.  
  175.    web2c/mpware/Makefile.in     adapted from metapost/mpware/Makefile
  176.    web2c/mpware/dmp.h.in    adapted from parts of metapost/site.h
  177.  
  178.  
  179. 5. Step d) Applying files:
  180.  
  181.    Finally, we need to patch a couple of files from the web2c and 
  182.    the MetaPost distribution by appling the patch web2c.mp.help.
  183.    (Note that this assumes that you have previously applied the 
  184.    web2c.kapthsea-2.x patch.)
  185.  
  186.    The following files are patched from the kpathsea-2.6 directory:
  187.  
  188.    Makefile
  189.  
  190.    kpathsea/HIER        Additional search paths for MetaPost.
  191.    kpathsea/tex-file.c        .
  192.    kpathsea/tex-file.h        .
  193.    kpathsea/texmf.cnf.in    .
  194.     
  195.    make/paths.make        Additional search paths for MetaPost
  196.    make/makevars.make        and passing them on to sub-makes.
  197.  
  198.    web2c/Makefile.in
  199.    web2c/configure.in
  200.    web2c/configure        (Sorry, I don't have autoconf!)
  201.  
  202.    web2c/lib/c-auto.h.in    Added SMALLMP and FIXPT symbols.
  203.    web2c/lib/texmf.c        Addtional code for MetaPost.
  204.    web2c/lib/texmf.h        .
  205.    web2c/lib/openinout.c    .
  206.    web2c/lib/openinput.h    .
  207.    web2c/lib/cpascal.h        .
  208.    web2c/lib/common.defines    .
  209.    web2c/lib/texmf.defines    .
  210.    
  211.    web2c/mp/mp.web        (Note: These are doc fixes only!)
  212.    web2c/mp/mp.ch        Several changes and updates.
  213.  
  214.    web2c/mpware/dvimp.ch    Several changes and updates.
  215.    web2c/mpware/dmp.c        Replaced MPPOOL by MPLIB (see dmp.h).
  216.    web2c/mpware/newer.c        Change site.h to c-auto.h.
  217.    web2c/mpware/makempx.in    Use @BINDIR@ template for sed.
  218.    web2c/mpware/troffmpx.in    Use @BINDIR@ template for sed.
  219.  
  220.    web2c/man/Makefile.in    
  221.    web2c/man/mp.man        (Preliminary! Could be improved!)
  222.  
  223.  
  224. 6. Unless I forgot to mention something, all should be set now
  225.    for compiling MetaPost and its support programs.
  226.  
  227.    You should do a 'make distclean' to remove any remaining 
  228.    config.cache files, then do 'sh configure' and 'make'.
  229.  
  230.    If that succeeds do 'make install' which will also generate
  231.    the .mem files for MetaPost (analogous to formats and bases)
  232.    and install them along with mp.pool in texmf/ini. To do so, 
  233.    you'll need to have installed the MetaPost macro files in 
  234.    texmf/mp first, as mentioned in Step 3.
  235.  
  236.    To test your MetaPost installation, change to /texmf/doc/mp
  237.    and try 'mp examples' followed by 'latex mpintro'. Also try
  238.    'mp manfig' to generate the figures for mpman. Unfortunately
  239.    you can't try out 'mp mpgraph' as the required data files for
  240.    the figures are not included in John Hobby's distribution.
  241.  
  242.  
  243. 7. Things worth mentioning:
  244.  
  245.    a) John Hobby's original change file for MP produces a small
  246.       version by default. I have changed this to a big version 
  247.       using parameters from mp.ch. There is a new SMALLMP option 
  248.       in c-auto.h.in analogous to SMALLTeX and SMALLMP.
  249.  
  250.    b) John Hobby's change file introduced a '-I' command line option 
  251.       to activate inimp when using a single (ini)mp binary for virmp 
  252.       and inimp. I have reverted this to separate binaries in order
  253.       to make use of the (symlinked) invocation name as the name of
  254.       the mem file to load. Note that a '-I' option on the command 
  255.       line is *not* ignored; it is treated as a file name instead.
  256.  
  257.    c) When MetaPost is invoked with a '-T' command line option, it 
  258.       will call the shell script 'troffmpx' instead of 'makempx'
  259.       to process labels embedded between btex ... etex blocks.
  260.       The default commands for these shell script used to be set
  261.       in the top-level MetaPost-specific site.h. They are now set
  262.       in web2c/mp/Makefile.in at compile time since the Makefile
  263.       knows about the default installation directory $(bindir).
  264.       You can still use the environment variable MPXCOMMAND to
  265.       overrule the default settings.
  266.       
  267.    d) The shell scripts 'makempx' and 'troffmpx' used to include
  268.       default search paths that needed to be adapted manually.
  269.       They are now generated automatically; the symbol @BINDIR@
  270.       is replaced by the default installation directory $(bindir)
  271.       at compile time in web2c/mpware/Makefile.in.
  272.  
  273.    e) The utility program 'dmp' that replaces 'dvitomp' when using
  274.       troff mode is still incomplete with respect to path searching. 
  275.       The default directory for troff support files (MPLIB) is set
  276.       in a header file dmp.h that's generated automatically from
  277.       dmp.h.in; the symbol @LIBDIR@ is replaced by the default 
  278.       library installation directory $(libdir) at compile time 
  279.       from web2c/mpware/Makefile.in. 
  280.  
  281.       Path searching for TeX font metrics (for PostScript fonts)
  282.       is not yet fully implemented in dmp.c. The default setting 
  283.       in dmp.h.in currently includes only Adobe Times Roman and 
  284.       Symbol. The TEXFONTS environment variable can be used to 
  285.       override this.
  286.        
  287.    f) MetaPost comes with macro files for two standard mem files: 
  288.       plain.mem and mfplain.mem (compatible to MF's plain.base).
  289.       When generating the mem files during 'make install' these 
  290.       are renamed to mp.mem and mfmp.mem and appropriate symlinks
  291.       are set up, so that you can invoke  MetaPost as 'mp' 
  292.       (default) or 'mfmp' (for full METAFONT compatibility). 
  293.  
  294.    g) The protection against overwriting a modified texmf.cnf file
  295.       by the original texmf.cnf will also prevent installing the
  296.       new version of texmf.cnf containing additional search paths
  297.       for MetaPost. You may have to update your texmf.cnf manually
  298.       in this case.
  299.  
  300.    h) Ideally, MetaPost should use the same psfonts.map as dvips,
  301.       but this currently doesn't work as MetaPost apparently gets 
  302.       confused by the comment lines and aborts prematurely. 
  303.       Until this is fixed by extending MetaPost's parsing routines
  304.       for the font map file, I have simply renamed MetaPost's own 
  305.       psfonts.map to mpfonts.map and installed that in texmf/dvips. 
  306.       However, this is certainly not the best solution, also because
  307.       the the name of the font map file is hard-wired in mp.ch.
  308.